export const mockData = ({ type }) => {
  if (type == '1') {
    return new Promise((r) =>
      r({
        statusCode: '1000',
        result: 'OK',
        message: '请求成功',
        data: [
          {
            id: 1,
            provinceId: null,
            marketId: null,
            year: null,
            type: 1,
            tradeWeek: 1,
            declWeek: 1,
            startDeclDate: null,
            startTime: '11:00',
            endDeclDate: null,
            endTime: '11:30',
            days: -1,
            declSchedule: '11:25',
          },
          {
            id: 2,
            provinceId: null,
            marketId: null,
            year: null,
            type: 1,
            tradeWeek: 2,
            declWeek: 2,
            startDeclDate: null,
            startTime: '11:00',
            endDeclDate: null,
            endTime: '11:30',
            days: null,
            declSchedule: null,
          },
          {
            id: 3,
            provinceId: null,
            marketId: null,
            year: null,
            type: 1,
            tradeWeek: 3,
            declWeek: 3,
            startDeclDate: null,
            startTime: '11:00',
            endDeclDate: null,
            endTime: '11:30',
            days: null,
            declSchedule: null,
          },
          {
            id: 4,
            provinceId: null,
            marketId: null,
            year: null,
            type: 1,
            tradeWeek: 4,
            declWeek: 4,
            startDeclDate: null,
            startTime: '11:00',
            endDeclDate: null,
            endTime: '11:30',
            days: null,
            declSchedule: null,
          },
          {
            id: 5,
            provinceId: null,
            marketId: null,
            year: null,
            type: 1,
            tradeWeek: 5,
            declWeek: 5,
            startDeclDate: null,
            startTime: '11:00',
            endDeclDate: null,
            endTime: '11:30',
            days: null,
            declSchedule: null,
          },
          {
            id: 6,
            provinceId: null,
            marketId: null,
            year: null,
            type: 1,
            tradeWeek: 6,
            declWeek: 6,
            startDeclDate: null,
            startTime: '11:00',
            endDeclDate: null,
            endTime: '11:30',
            days: null,
            declSchedule: null,
          },
          {
            id: 7,
            provinceId: null,
            marketId: null,
            year: null,
            type: 1,
            tradeWeek: 7,
            declWeek: 7,
            startDeclDate: null,
            startTime: '11:00',
            endDeclDate: null,
            endTime: '11:30',
            days: null,
            declSchedule: null,
          },
        ],
      }),
    );
  } else {
    return new Promise((r) =>
      r({
        statusCode: '1000',
        result: 'OK',
        message: '请求成功',
        // data: [],
        data: [
          {
            holidayName: '2025年元旦',
            holidayStartDate: '2025-01-01',
            holidayEndDate: '2025-01-01',
            startTime: '11:00:00',
            endTime: '11:30:00',
            days: 1,
          },
          {
            holidayName: '2025年春节',
            holidayStartDate: '2025-01-28',
            holidayEndDate: '2025-02-04',
            startTime: '11:00:00',
            endTime: '11:30:00',
            days: 8,
          },
          {
            holidayName: '2025年清明节',
            holidayStartDate: '2025-04-04',
            holidayEndDate: '2025-04-06',
            startTime: '11:00:00',
            endTime: '11:30:00',
            days: 3,
          },
          {
            holidayName: '2025年劳动节',
            holidayStartDate: '2025-05-01',
            holidayEndDate: '2025-05-05',
            startTime: '11:00:00',
            endTime: '11:30:00',
            days: 5,
          },
          {
            holidayName: '2025年端午节',
            holidayStartDate: '2025-05-31',
            holidayEndDate: '2025-06-02',
            startTime: '11:00:00',
            endTime: '11:30:00',
            days: 3,
          },
          {
            holidayName: '2025年国庆节',
            holidayStartDate: '2025-10-01',
            holidayEndDate: '2025-10-08',
            startTime: '11:00:00',
            endTime: '11:30:00',
            days: 8,
          },
          {
            holidayName: '2025年中秋节',
            holidayStartDate: '2025-10-06',
            holidayEndDate: '2025-10-06',
            startTime: '11:00:00',
            endTime: '11:30:00',
            days: 1,
          },
        ],
      }),
    );
  }
};

export const mockData2 = () => {
  return new Promise((r) =>
    r({
      statusCode: '1000',
      result: 'OK',
      message: '请求成功',
      data: [
        {
          holidayName: '2025年元旦',
          holidayStartDate: '2025-01-01',
          holidayEndDate: '2025-01-01',
          startTime: '11:00:00',
          endTime: '11:30:00',
          days: 1,
        },
        {
          holidayName: '2025年春节',
          holidayStartDate: '2025-01-28',
          holidayEndDate: '2025-02-04',
          startTime: '11:00:00',
          endTime: '11:30:00',
          days: 8,
        },
        {
          holidayName: '2025年清明节',
          holidayStartDate: '2025-04-04',
          holidayEndDate: '2025-04-06',
          startTime: '11:00:00',
          endTime: '11:30:00',
          days: 3,
        },
        {
          holidayName: '2025年劳动节',
          holidayStartDate: '2025-05-01',
          holidayEndDate: '2025-05-05',
          startTime: '11:00:00',
          endTime: '11:30:00',
          days: 5,
        },
        {
          holidayName: '2025年端午节',
          holidayStartDate: '2025-05-31',
          holidayEndDate: '2025-06-02',
          startTime: '11:00:00',
          endTime: '11:30:00',
          days: 3,
        },
        {
          holidayName: '2025年国庆节',
          holidayStartDate: '2025-10-01',
          holidayEndDate: '2025-10-08',
          startTime: '11:00:00',
          endTime: '11:30:00',
          days: 8,
        },
        {
          holidayName: '2025年中秋节',
          holidayStartDate: '2025-10-06',
          holidayEndDate: '2025-10-06',
          startTime: '11:00:00',
          endTime: '11:30:00',
          days: 1,
        },
      ],
    }),
  );
};
